home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / bbs / rp100.zip / RPSTRUCT.INC < prev    next >
Text File  |  1993-12-26  |  8KB  |  205 lines

  1. (*
  2. ** Prime request processor for Frontdoor structure file
  3. **
  4. ** Copyright (c) 1993 Hans Siemons, Prime Productions; All rights reserved.
  5. ** Copyright (c) 1993 Marco Miltenburg.
  6. **
  7. **
  8. ** Last revision (dd/mm/yy) : 06-12-93
  9. **
  10. ** [...]
  11. ** This information is not necessarily final and is subject to change at any
  12. ** given time without further notice
  13. ** [...]
  14. *)
  15.  
  16. (*
  17. ** General notes:
  18. ** date format used everywhere is the UNIXdate format.
  19. ** CRC's over strings are on the text only (not the size). 'A'..'Z' are
  20. ** casted to 'a'..'z'. (international characters are not taken in
  21. ** considiration!
  22. **
  23. ** CRC's over AKA's, are simply CRC's over the '8' bytes.
  24. **
  25. ** The CRC's are the standard CRC32's, used by PKZip and ZModem.
  26. **
  27. ** If you do not have any library to calculate them, use the CRC32 routines
  28. ** from RADUMISC.TPU (included with RADU)
  29. *)
  30.  
  31. (*
  32. ** FILEBASE.RP contains the database to the filebase. The request processor
  33. ** only takes this file, and the magic filename database in consideration
  34. ** when a node requests something.
  35. **
  36. ** Duplicate files in different groups in no problem. RP will never send the
  37. ** same file twice.
  38. *)
  39.  
  40. Type FIdx = record                                            { FILEBASE.RP }
  41.              FileName : String[12]; { filename }
  42.              size     : Longint;    { filesize }
  43.              date     : Longint;    { filedate }
  44.              dir      : Longint;    { pointer to directory }
  45.              pwdcrc   : Longint;    { crc-32 over password,-1=no password }
  46.              group    : char;       { group of file }
  47.            end;
  48.  
  49. (*
  50. ** Descriptions are placed in DESCRIPT.RP, and is a file of character. It just
  51. ** contains the pure text.
  52. *)
  53.  
  54.      DescInfoRecord=record                                 { descinfo.rp }
  55.               FileName : Longint;                 { crc-32 over filename }
  56.               desc     : Longint;               { pointer to description }
  57.               Descs    : Integer;                { length of description }
  58.             end;
  59.  
  60. (*
  61. ** Magic names database
  62. ** This database is searched in first. If a file has a "magic hit", it can
  63. ** never have a "file hit" anymore.
  64. **
  65. ** For magic names that represent more then one file, a record is added
  66. ** per file. The request processor itselve handles it correctly.
  67. *)
  68.      Midx = record                                               { MAGIC.RP }
  69.               Magicname,            { crc-32 over magic name }
  70.               Pwdcrc,               { crc-32 over password,-1=no password }
  71.               FileName : Longint;   { pointer to filelist }
  72.               size,                 { filesize }
  73.               date     : Longint;   { filedate }
  74.               Group    : Char;      { group of file }
  75.             end;
  76.  
  77. (*
  78. ** FileName (Midx) and dir (Fidx) point a in straight ascii text file called
  79. ** "textbase.rp". If RP hits on a magic name, it extracts from "textbase.rp"
  80. ** the actual filename. If RP hits on a filename, it extracts the directory
  81. ** from it.
  82. *)
  83.  
  84. (*
  85. ** REQUESTD.RP contains information about what a node already requested,
  86. ** and is used to setup "requestlimits" per day.
  87. **
  88. ** There can be more then one record from the same node, since FDRPR
  89. ** stores a record per "request session".
  90. *)
  91.  
  92.      Requested=record                                        { REQUESTD.RP }
  93.                  NodeCrc : Longint;                      {crc-32 over node#}
  94.                  FileID : Longint;
  95.                  KBrequested,
  96.                  NRrequested,
  97.                  TIMErequested : Longint;
  98.                  RequestDate : Longint;        { date of request, unixdate }
  99.                  Recovertime : Integer;              { recovertime of node }
  100.                end;
  101.  
  102. (*
  103. ** Nodefile.RP  contains the node database, and lists the AKA, level,
  104. ** access groups.
  105. ** There is no particular sorting order in this file.
  106. *)
  107.  
  108.      Noderecord=record                                        { nodefile.rp }
  109.                   Zone,
  110.                   Net,
  111.                   Node,
  112.                   Point : word;
  113.                   Name : String[40];
  114.                   Level : word;
  115.                   groups : longint; { bit 0='a', bit 1='b' }
  116.                   Deleted : boolean;
  117.                   DenyRequest : boolean;
  118.                   TimeToRecover : Integer;
  119.                   crc : longint;
  120.                   reserved: array[1..65] of char;
  121.                 end;
  122.  
  123. Const MyRev=1;
  124.  
  125. type PathStr=String[78];
  126.  
  127.      timeslottype=record
  128.                     start,        { minutes since 00:00 }
  129.                     stop : longint;
  130.                   end;
  131.  
  132.      groupsetup=record
  133.                   Name : string[20];   { group name }
  134.                   Paths : PathStr;
  135.                   Magics : PathStr;
  136.                   Passwords : PathStr;   { file of passwords }
  137.                   minbaud : Longint;
  138.                   StopMatch : Boolean;
  139.                   LimitedTime : boolean;    { limit hours ;-)) }
  140.                   days : Byte; { sunday=bit 0, all=bit 7 }
  141.                   timeslot : timeslottype;
  142.                   FreeKB,
  143.                   FreeTime,
  144.                   FreeMatch : boolean;
  145.                   CDrom : Boolean;
  146.                   reserved : array[1..128] of byte;
  147.                 end;
  148.      groupsetupar=array[1..26] of groupsetup;
  149.  
  150. { RP reads like this:
  151.  
  152.   read record,
  153.   level lower or requel to then "userlevel" : read it
  154.   baudrate lower or equel to to then "userbaudrate" : read it
  155.  
  156.   This file is sorted on level and baudrate, where level is the primary key
  157. }
  158.  
  159.      LimitRecord=record                                      { limits.rp }
  160.                    level : word;
  161.                    Baudrate : longint;
  162.                    Days : byte;
  163.                    LimitedTime : boolean;
  164.                    Timeslot : timeslottype;
  165.                    MaxMatchPT,   { pt=per time slot }
  166.                    MaxTimePT,
  167.                    MaxKBPT,
  168.                    MaxMatchPS,   { ps=per session }
  169.                    MaxTimePS,
  170.                    MaxKBPS : word;
  171.                  end;
  172.  
  173.      ULnodelimittype=record      { unlistednode limit type }
  174.         Groups : Longint;
  175.         Level : word;
  176.         Recovertime : Integer;
  177.       end;
  178.  
  179.      SendMessageWithRecord=record
  180.         Path,
  181.         textfile : PathStr;
  182.       end;
  183.  
  184.      CtlRecord=record                                        { setup.rpr }
  185.                  Signature : Longint;       { must contain <R><P><R><#0> }
  186.                  Revision : word;                      { must be <myrev> }
  187.                  default : noderecord;              { default noderecord }
  188.                  nlsecure,      { not listed in database, secure session }
  189.                  nlunsecure,   { not listed in databse, unsecure session }
  190.                  nlnodelist : ULnodelimittype;
  191.                         { not listed in database, not listed in nodelist }
  192.  
  193.                  groups : groupsetupar;
  194.                  Editor : PathStr;                     { external editor }
  195.                  About : PathStr; {tekst file send when requesting about }
  196.                  LogFile : PathStr;     { logfile. Empty=use frodo's log }
  197.                  CompLogFile : PathStr; { RPcomp logfile, empty use "logfile" }
  198.                  SystemPath : PathStr;     { Empty=use RP.EXE's home dir }
  199.                  WorkDir : PathStr;                         { for cd-rom }
  200.                  NodelistLookup : boolean;         { search in nodelist? }
  201.                  Pointslisted : boolean;     { listed.point also listed? }
  202.                  Nodelistpath : PathStr;              { path to nodelist }
  203.                  IndexExtension : String[3];           { index extension }
  204.                end;
  205.